home *** CD-ROM | disk | FTP | other *** search
- Path: news1.erols.com!newsmaster@erols.com
- From: Chris Cobb <ccobb@cseg.com>
- Newsgroups: comp.lang.c++
- Subject: Re: extern consts
- Date: 17 Mar 1996 23:34:01 GMT
- Organization: CSEG, Inc.
- Message-ID: <4ii7h9$bq6@news6.erols.com>
- References: <4idbcv$ue2@news7.erols.com> <314c2077.138956468@nntp.ix.netcom.com>
- NNTP-Posting-Host: ccobb.erols.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22KIT (Windows; U; 16bit)
-
- miker3@ix.netcom.com (Mike Rubenstein) wrote:
- >
- >It's not legal. extern const is legal, but in any compilation unit
- >that does not see the initializer the const variable is not a constant
- >expression.
- >
-
- Well, your comment makes sense. However, in a way it seem
- self-contradictory. If a const can be extern, then it no longer is a
- const: you've basically externed away constness. But if thats what
- externinig a const does, it doesn't make sense to allow it at all (which
- is what happens on most compilers.)
-
- Chris
-
-
-